﻿using System;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using Cinema.Model;
using Cinema.Control;
using Cinema.GUI;
using System.Runtime.Remoting.Channels.Http;

namespace Client
{
    class Client
    {
        static void Main(string[] args)
        {
            try
            {
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);

                TicketSales ts = (TicketSales)Activator.GetObject(typeof(TicketSales), "tcp://localhost:3456/TicketSales.soap");
                Console.WriteLine("Show how many tickets were sold" + ts);

                SaloonAdministration sa = ts.GetSaloonAdministration();
                int value = sa.GetSeats();

                Console.WriteLine("Some info, not even important.. but who cares.. ");

            }
            catch (System.Net.Sockets.SocketException e)
            {
                Console.WriteLine(e.ErrorCode);
                Console.WriteLine(e);
            }
            Console.ReadLine();

        }
    }
}

